﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using Joseph.CareerPathApplication;
using Telerik.Web.UI;
using System.Collections.Generic;

public partial class ViewJobApplications : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        
    }

    
    protected void Button1_Click(object sender, System.EventArgs e)
    {
        ConfigureExport();
        RadGrid1.MasterTableView.ExportToExcel();
    }

    protected void Button2_Click(object sender, System.EventArgs e)
    {
        ConfigureExport();
        RadGrid1.MasterTableView.ExportToWord();
    }

    protected void Button3_Click(object sender, System.EventArgs e)
    {
        ConfigureExport();
        RadGrid1.MasterTableView.ExportToCSV();
    }
   
    public void ConfigureExport()
    {
        RadGrid1.ExportSettings.ExportOnlyData = CheckBox1.Checked;
        RadGrid1.ExportSettings.IgnorePaging = CheckBox2.Checked;
        RadGrid1.ExportSettings.OpenInNewWindow = CheckBox3.Checked;
    }
    
    protected void LinqDataSource1_Selected(object sender, LinqDataSourceStatusEventArgs e)
    {
        //Cache a copy of the data for faster performance
        Session["mydata"] = (List<cp_Application>)e.Result;
    }
}
